//
//  BTESettingView.swift
//  BTE
//
//  Created by Mike Zhang on 2025/8/5.
//

import UIKit

class BTESettingView: UIView {
    
     let i1 = UIImageView(image: UIImage.init(named:  BTELanguageManager.shared.localizedImageString(forKey:"Group 1171276709")))
    
    private let tname = UILabel.init()
    
     let i2 = UIImageView(image: UIImage.init(named:  BTELanguageManager.shared.localizedImageString(forKey:"Group 1312316871")))
    
     let i3 = UIImageView(image: UIImage.init(named:  BTELanguageManager.shared.localizedImageString(forKey:"Group13123168729")))
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        
        
        tname.text = BTELanguageManager.shared.localizedString(forKey: "Other services")
        tname.font = .systemFont(ofSize: 16, weight: .regular)
        tname.textColor = .black
        
        addSubview(i1)
        addSubview(tname)
        addSubview(i2)
        addSubview(i3)
        
        let sc = UIScreen.main.bounds.width - 16 - 16 - 16
        
        i1.snp.makeConstraints { make in
            make.top.equalToSuperview().offset(16)
            make.left.right.equalToSuperview().inset(16)
            make.height.equalTo(sc * i1.frame.height / i1.frame.width)
        }
        
        tname.snp.makeConstraints { make in
            make.left.equalToSuperview().offset(20)
            make.top.equalTo(i1.snp.bottom).offset(18)
        }
        
        i2.snp.makeConstraints { make in
            make.top.equalTo(tname.snp.bottom).offset(16)
            make.left.equalToSuperview().inset(16)
            make.width.equalTo(sc/2)
            make.height.equalTo((sc/2) * i2.frame.height / i2.frame.width)
        }
        
        i3.snp.makeConstraints { make in
            make.top.equalTo(tname.snp.bottom).offset(16)
            make.left.equalTo(i2.snp.right).offset(15)
            make.width.equalTo(sc/2)
            make.height.equalTo((sc/2) * i2.frame.height / i2.frame.width)
        }
        
        if BTELanguageManager.shared.currentLanguage == .YINDU {
            i3.image = UIImage.init(named: "fewfewfewf33333333")
        } else {
            i3.image = UIImage.init(named: "Group131231687efwfewfewfewfwe61")
        }
        
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
  
}
